@import "../../base/fn";
.kdui-grids {
  position: relative;
  overflow: hidden;
  background: #fff;
  &.kdui-grids__border_none {
    border: none;
  }
  &:before {
    .setTopLine();
  }
  &:after {
    .setLeftLine();
  }
}

.kdui-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  float: left;
  width: 100% / @kduiGridColumnCount;
  height: 2rem;
  &.kdui-grid__col-2 {
    width: 100% / @kduiGridColumnCount * 2;
  }
  &.kdui-grid__col-3 {
    width: 100%;
  }
  &.kdui-grid__row-2 {
    height: 4rem;
  }
  &.kdui-grid__row-3 {
    height: 6rem;
  }
  &:active {
    background-color: @kduiActiveColor;
  }
  &.kdui-grid__border_none {
    border: none;
  }
  &:before {
    .setRightLine();
  }
  &:after {
    .setBottomLine();
  }
}

.kdui-grid__icon {
  width: @kduiGridIconSize;
  height: @kduiGridIconSize;
  font-size: @kduiGridIconSize;
  margin: 0 auto;
  img {
    display: block;
    width: 100%;
    height: 100%;
  }
  &+.kdui-grid__label {
    margin-top: .2rem;
  }
}

.kdui-grid__label {
  display: block;
  text-align: center;
  color: @kduiFontPrimaryColor;
  font-size: @kduiGridFontSize;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}